
<style>
    body{
        color: #3b3b3b;
    }
</style>
<div class="content">
    <div style="padding: 0 10px;font-size: 14px;height: 40px;line-height: 40px;">
        <a href="/admin/adsense/index">广告位列表</a>
    </div>
    <div class="panel panel-default panel-intro">
        <div class="panel-body">
            <div id="" class="tab-content">
                <div class="tab-pane fade active in" id="one">
                    <div class="widget-body no-padding">
                        <div class="bootstrap-table">
                            <div class="fixed-table-toolbar">
                                <div class="bs-bars pull-left">
                                    <div id="toolbar" class="toolbar" style="position: relative;">
                                        <a href="/admin/adsense/index_ad_add?sense_id={$sense_id}" class="btn btn-success btn-add " title="添加"><i class="fa fa-plus"></i> 添加</a>
                                        <button class="btn btn-success btn-add " title="添加"  onclick='product("{$sense_id}");'><i class="fa fa-plus"></i> 产品ID添加</button>
                                    </div>
                                </div>
                                <form action="" method="post">
                                    <table id="" class="table table-striped table-bordered table-hover table-nowrap" data-operate-edit="1" data-operate-del="1" width="100%">
                                        <thead>

                                        <tr>
                                            <th class="bs-checkbox " style="text-align: center; vertical-align: middle;width:3%;height: 45px;" data-field="0">

                                            </th>
                                            <th style="text-align: center; vertical-align: middle;width:6%;" data-field="type">
                                                <div class="th-inner ">排序</div>
                                                <div class="fht-cell"></div>
                                            </th>
                                            <th style="text-align: center; vertical-align: middle;width:4.5%;" data-field="fid">
                                                <div class="th-inner ">ID</div>
                                                <div class="fht-cell"></div>
                                            </th>
                                            <th style="text-align: center; vertical-align: middle;width:10%;" data-field="fid">
                                                <div class="th-inner ">广告位id</div>
                                                <div class="fht-cell"></div>
                                            </th>
                                            <th style="text-align: center; vertical-align: middle;width:15%;" data-field="title">
                                                <div class="th-inner ">标题</div>
                                                <div class="fht-cell"></div>
                                            </th>
                                            <!--<th style="text-align: center; vertical-align: middle;width:6%;" data-field="type">
                                                <div class="th-inner ">广告链接</div>
                                                <div class="fht-cell"></div>
                                            </th>-->
                                            {if condition = '$sense_id eq 70'}
                                            <th style="text-align: center; vertical-align: middle;width:20%;" data-field="type">
                                                <div class="th-inner ">显示位置</div>
                                                <div class="fht-cell"></div>
                                            </th>
                                            {else/}
                                            <th style="text-align: center; vertical-align: middle;width:6%;" data-field="type">
                                                <div class="th-inner ">产品id</div>
                                                <div class="fht-cell"></div>
                                            </th>
                                           <th style="text-align: center; vertical-align: middle;width:6%;" data-field="type">
                                                <div class="th-inner ">媒体类型</div>
                                                <div class="fht-cell"></div>
                                            </th>
                                            <th style="text-align: center; vertical-align: middle;width:6%;" data-field="type">
                                                <div class="th-inner ">标题2</div>
                                                <div class="fht-cell"></div>
                                            </th>
                                            {/if}
                                            <th style="text-align: center; vertical-align: middle;width:6%;" data-field="type">
                                                <div class="th-inner ">图片</div>
                                                <div class="fht-cell"></div>

                                            <th style="text-align: center; vertical-align: middle;width: 20%;" data-field="operate">
                                                <div class="th-inner ">操作</div>
                                                <div class="fht-cell"></div>
                                            </th>
                                        </tr>
                                        </thead>
                                        <tbody data-listidx="0">
                                        {volist name="list" id="vo"}
                                        <tr data-index="0">
                                            <td class="bs-checkbox "></td>
                                            <td style="text-align: center; vertical-align: middle; ">
                                                <input type="number" name="{$vo.id}" value="{$vo.ad_order}" style="width:50px;" min="0"/>
                                            </td>
                                            <td style="text-align: center; vertical-align: middle; ">
                                                {$vo.id}
                                            </td>
                                            <td style="text-align: center; vertical-align: middle; ">
                                                {$vo.adtitle}
                                            </td>
                                            <td style="text-align: center; vertical-align: middle; ">
                                                {$vo.title}
                                            </td>
                                            {if condition = '$sense_id eq 70'}
                                            <td style="text-align: center; vertical-align: middle; ">
                                                {if $vo.home_post == 1}
                                                   首页显示
                                                {/if}
                                                {if $vo.show_post == 1}
                                                   详细页显示
                                                {/if}
                                            </td>
                                            {else/}
                                            <td style="text-align: center; vertical-align: middle; ">
                                                {$vo.p_id}
                                            </td>
                                            
                                            <td style="text-align: center; vertical-align: middle; ">
                                                {if condition="$vo.mtype eq 0"}图片{else/}视频{/if}
                                            </td>
                                            <td style="text-align: center; vertical-align: middle; ">
                                                {$vo.title2}
                                            </td>
                                            {/if}
                                            <td style="text-align: center; vertical-align: middle; ">
                                                <img src="{$vo.imgurl}" style="width:auto;height:50px;"/>
                                            </td>
                                            <td style="text-align: center; vertical-align: middle; ">
                                                <a href="/admin/adsense/index_ad_edit?id={$vo.id}&sense_id={$vo.sense_id}" class="btn btn-success btn-edit btn-disabled" title="编辑"><i class="fa fa-pencil"></i> 编辑</a>
                                                <a href="/admin/adsense/index_ad_del?id={$vo.id}" onclick="return confirm('确定要删除吗');"  class="btn btn-success btn-add btn-disabled" title="删除"><i class="fa fa-trash"></i> 删除</a>
                                            </td>
                                        </tr>
                                        {/volist}
                                        </tbody>
                                        <tr>
                                            <td colspan="8" style="padding-left:88px; ">
                                                <input type="submit" value="排序" class="group_btn" />
                                            </td>
                                          
                                        </tr>
                                    </table>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

</div>


<script>
    function product(sense_id){
        layer.open({
            type: 2,
            title:"选择产品",
            shift: 2,
            area: ['60%', '500px'],
            //shadeClose: true,
            content: ['index_ad_product_select?sense_id='+sense_id,'no'],
            scrollbar: false ,//屏蔽浏览器滚动条
        });
    }
</script>